'use client'

import { useEffect } from 'react';
import { useRouter } from 'next/navigation';

/**
 * 首页组件
 * 自动重定向到登录页面
 */
export default function Home() {
  const router = useRouter();

  useEffect(() => {
    // 页面加载时自动跳转到登录页
    router.push('/login');
  }, [router]);

  return (
    <div className="min-h-screen flex items-center justify-center">
      <div className="text-center">
        <div className="animate-spin h-12 w-12 border-4 border-blue-500 border-t-transparent rounded-full mx-auto mb-4"></div>
        <p className="text-gray-600">正在跳转到登录页...</p>
      </div>
    </div>
  );
}
